import auth from './auth'
import util from './util'


const get = (param) => {
  param.method = 'GET';
}

const getSync = (param) => {
  return new Promise((reslove) => {
    param.method = 'GET';
    param.success = data => {
      reslove(data);
    }
  });
}



const getUserData = (openid, success) => {
  get({
    url: `/getUserByOpenid?openid=${openid}`,
    success: success
  })
}

export default {
  get,
  getSync,
  getUserData,
}